package jjn.time_api.case3;

import java.time.LocalDate;
import java.time.temporal.TemporalAdjusters;
import java.util.Scanner;

/**
 * @author Jjn
 * @since 2023/8/16 13:42
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String line = scanner.nextLine();
            LocalDate date = LocalDate.parse(line);
            LocalDate nextMonthStart = date.plusMonths(1).withDayOfMonth(1);
            LocalDate nextMonthEnd = date.plusMonths(1).with(TemporalAdjusters.lastDayOfMonth());
            System.out.println(nextMonthStart);
            System.out.println(nextMonthEnd);
        }
    }
}
